package com.joinway.framework.admin.bean.domain;

import com.joinway.framework.bean.domain.AbstractDomain;
import com.joinway.framework.bean.domain.annonation.PersistFormat;
import com.joinway.framework.bean.domain.type.PersistCase;

public class TreeMenu extends AbstractDomain {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2057603312861779030L;

	String text;
	
	int parentId;
	
	@PersistFormat(PersistCase.Upper)
	String status;
	
	String url;

	int order;
	
	String icon;
	
	String appId;
	
	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public int getParentId() {
		return parentId;
	}

	public void setParentId(int parentId) {
		this.parentId = parentId;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public int getOrder() {
		return order;
	}

	public void setOrder(int order) {
		this.order = order;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == null) return false;
		if (obj == this) return true;
		if (!(obj instanceof TreeMenu)) return false;
		
		TreeMenu other = (TreeMenu)obj;
		return this.getId() == other.getId();
	}

	@Override
	public int hashCode() {
		return this.getId();
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

//	public String getTitle() {
//		return title;
//	}
//
//	public void setTitle(String title) {
//		this.title = title;
//	}
	
}
